function http({
	url,
	method = "get",
	data
}) {
	
	// #ifdef H5
	let baseURL = "/api"
	// #endif
	
	// #ifndef H5
	let baseURL = "http://124.223.9.151:8000"
	// #endif
	
	return new Promise((resolve, reject) => {
		uni.request({
			url: baseURL + url,
			method: method,
			data: data,
			header: {
				// 修改请求内容类型
				// "content-type": "application/x-www-form-urlencoded"
			},
			success: (res) => {
				resolve(res.data)
			},
			fail: (err) => {
				reject(err)
			}
		})
	})
}
export default http;